package com.fsl.ocsmanagercenter.controller;

import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class OcsManagerController {

    @Value("${server.port}")
    String port;

    /**
     * get请求
     * @return
     */
    @ResponseBody
    @RequestMapping("/getOcsInfo")
    public String getOcsInfo(){
        Map<String,Object> map = new HashMap<String,Object>();
        map.put("name","druant");
        map.put("age",38);
        map.put("team","king chou");
        map.put("service","ocs");
        map.put("port",port);
        return JSON.toJSONString(map);
    }
}
